package com.jf.identity.controller;

import com.jf.identity.entity.Examinee;
import com.jf.identity.entity.ResponseBean;
import com.jf.identity.exception.ServiceException;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * 处理普通业务
 *
 * @author FCG
 */
@Controller
public class CommonController {

    @RequestMapping("paramEx")
    @ResponseBody
    public ResponseBean sendError(HttpServletRequest request) {
        throw new ServiceException((String) request.getAttribute("paramEx"));
    }

//    @RequestMapping("test")
//    @ResponseBody
//    public ResponseBean test(@RequestBody List<Examinee> examinees) {
//        System.out.println(examinees);
//        return new ResponseBean();
//    }

}
